Block data storage devices store and/or retrieve digital data in the form of blocks, which are individually addressable by a host device. Exemplary block data storage devices include hard disc drives, optical disc recorders and players, and magnetic digital tape recorders and players.
Such devices typically comprise a hardware/firmware based interface circuit having a buffer (first memory space), a communication channel and a recordable medium (second memory space). The second memory space is divided into a number of addressable blocks which are assigned host-level addresses (sometimes referred to as logical block addresses or LBAs). Each LBA typically has a corresponding physical block address (PBA) used by servo control circuitry to align a data transducing head with the appropriate portion of the medium to access the desired LBA.
To write data to the medium, the host device issues a write command comprising the user data to be stored by the storage device along with a list of LBAs to which the user data are to be stored. The storage device temporarily stores the user data in the first memory location, schedules movement of the data transducing head to the appropriate location(s) over the medium, and then uses write channel portions of the communication channel to apply the appropriate encoding and conditioning of the data to write the data to the selected LBAs.
To subsequently read the data from the storage device, the host device issues a read command identifying the LBAs from which data are to be retrieved. The storage device schedules movement of the data transducing head to the appropriate location(s) over the medium, and then uses read channel portions of the communication channel to decode readback data which are placed into the first memory space (buffer) for subsequent transfer back to the host device.
A typical data storage device is configured to concurrently handle multiple pending access (read and write) commands from the host device. The commands are arranged into a command queue and a sort strategy is used to identify a sequence of execution of the pending access commands that will tend to optimize the rate at which data are transferred between the host device and the data storage device. A typical sort strategy involves calculating the elapsed time that would be required to move the appropriate data transducing head to the appropriate physical address of the medium in order to service each command. Generally, the access command that can be serviced in the shortest access time is selected from among the command queue as the next command to be executed.
In data storage devices that use rotatable media (discs), the time required for a particular data block to rotate around and reach the head (latency) is an important factor when selecting the execution order, as delays in waiting for the disc to rotate a selected data block around to the data transducing head can significantly decrease the resulting transfer rate.
One way that storage devices attempt to reduce the effects of such latency delays involves reading additional, nonrequested data into the buffer while the device waits for the requested data block to reach the head. If the host subsequently requests such data in the future, the data request can be satisfied immediately from the buffer (sometimes referred to as a “cache hit”). Cache hits tend to significantly improve data transfer performance and are therefore highly desirable.
Well known approaches to placing nonrequested data into the buffer include read look ahead (RLA) and read on arrival (ROA) techniques. Generally, RLA involves receiving a command to move a selected head to a new track, but remaining on the existing track to read additional data sectors before moving to the new track. By contrast, ROA generally involves proceeding to a new track and immediately reading data sectors on the new track during the latency period until the target sector rotates around and reaches the head.
Host data access patterns play a large role in determining the effectiveness of placing nonrequested data into the buffer. When the host device is requesting data that are localized and/or sequential, then techniques such as RLA and ROA can increase the probability that future requests may be satisfied by cache hits. On the other hand, if the host data accesses are to nonlocalized positions within the LBA sequence (i.e., apparently random with respect to the disc surfaces), then there is little (if any) benefit to be gained by caching nonrequested data. Moreover, the overhead typically required in prior art systems to cache the data can, in some cases, actually degrade data transfer performance slightly since the drive is occupied with putting nonrequested data into the buffer and managing these data instead of focusing exclusively on servicing actual access commands from the host.
In the prior art, it is reasonably straightforward to determine that a device should switch from a local mode of operation to a nonlocal mode of operation (that is, that the device should stop caching nonrequested data). All that generally needs be done is monitor the frequency of cache hits over a period of time. If such hits seldom (or never) occur, then there is no need to cache the nonrequested readback data and such operation can be halted.
The more difficult task, however, is to determine when it would be appropriate to switch from a nonlocal mode to a local mode of operation (that is, start caching data after a period of time during which data were not cached). It is difficult to assess the benefits that might have been gained by caching data when the device has been operating in a nonlocal mode. To date there is no known existing mechanism for reliably switching from a nonlocal mode to a local mode of operation based upon a detected change in data access patterns.
Accordingly, there is a need for improvements in the art to provide effective data transfer control of a block data storage device that overcomes these and other limitations of the prior art.